﻿using System;

namespace CalendarSubscriptionApp
{
	/// <summary>
	/// Interaction logic for AppointmentsWindow.xaml
	/// </summary>
	public partial class AppointmentsWindow
	{
	    private readonly AppointmentsWindowViewModel _ViewModel;

	    public AppointmentsWindow()
		{
			InitializeComponent();
		}

        public AppointmentsWindow(AppointmentsWindowViewModel viewModel): this()
        {
            if (viewModel == null) throw new ArgumentNullException("viewModel");
            _ViewModel = viewModel;
            DataContext = _ViewModel;
        }

	    private void OpenMailboxButtonClick(object sender, System.Windows.RoutedEventArgs e)
        {
            _ViewModel.OpenMailbox();
        }
	}
}
